package com.dashan.looperpager.sensor;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.dashan.looperpager.R;

/**
 * @description: 传感器测试
 * @copyRight: 厦门立林科技有限公司
 * @author: yanxun
 * @createTime: 2022/4/13
 */
public class SensorActivity extends AppCompatActivity {

    private SensorUtils mSensorUtils;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sensor);
        View tv = findViewById(R.id.tv);
        tv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(SensorActivity.this, TestSensorActivity.class));
                finish();
            }
        });
        mSensorUtils = SensorUtils.getInstance();
        mSensorUtils.register();
        Log.d("SensorUtils", "对象引用 ==> " + mSensorUtils);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.d("SensorUtils", "onDestroy...");
        //mSensorUtils.release();
    }
}
